
<div class="content">
	<?php
	$tools = array();
	//if(n_api("rbac")->check("passport-conf"))
	$tools[] = n_ui(n_url('passport','confEdit'),'设置');
	$tools[] = n_ui(n_url('nconfig','pluginIndex',array("pevent"=>N_EVENT)),'设置');
	echo n_mod('skin')->pageHead("用户列表",$tools)
	?>
	<div class="n-sep">
	<table class="n-table n-size-full">
		<thead>
			<tr>
				<td colspan="10">
					<div class="n-right">
					<form>
						<input class="n-search" tips="账号" type="text" name="uname" value="<?=empty($data['uname'])?'':$data['uname']?>" />
						<input type="submit" />
					</form>
					</div>
				</td>
			</tr>
		</thead>
		<tbody>
		<tr>
			<th>ID</th>
			<th>账号</th>
			<th>昵称</th>
			<th>状态</th>
			<th>操作</th>
		</tr>

		<?php
		
		if(!empty($data['data'])){
			foreach($data['data'] as $key=>$val){
		?>
		<tr>
			<td><?=$val['id']?></td>
			<td><?=$val['uname']?></td>
			<td><?=$val['nickname']?></td>

			<td><?='OFF'==$val['state']?'<span class="n-red">停用</span>':'正常'?></td>
			<td>
				<?php
				if('OFF'==$val['state']){
				?>
				<?=n_ui(n_url('passport','seton',array('ppid'=>$val['id'])),"恢复")?>				
				<?php
				}else{
				?>
				<?=n_ui(n_url('passport','setoff',array('ppid'=>$val['id'])),"停用")?>
				<?php
				}
				?>
			</td>
		</tr>
		
		<?php
			}
		}
		?>
		</tbody>
	</table>
	<div class="n-paging"><?=$data['paging']?></div>
	</div>
</div>		
